home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / laptop-mode-tools / modules / nmi-watchdog < prev    next >
Encoding:
Text File  |  2012-05-20  |  835 b   |  29 lines

  1. #! /bin/sh
  2. # Laptop mode tools module: NMI Watchdog timer power savings
  3. #
  4.  
  5. if [ x$CONTROL_NMI_WATCHDOG = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_NMI_WATCHDOG = xauto ]; then
  6.     if [ $ON_AC -eq 1 ]; then
  7.         log "VERBOSE" "On AC power: setting NMI Watchdog Timer to 1"
  8.         if [ -w /proc/sys/kernel/nmi_watchdog ]; then
  9.             echo 1 > /proc/sys/kernel/nmi_watchdog
  10.             log "VERBOSE" "NMI Watchdog timer enabled"
  11.         else
  12.             log "VERBOSE" "NMI Watchdog timer is not available"
  13.         fi
  14.     else
  15.         log "VERBOSE" "On battery: setting NMI Watchdog timer to 0"
  16.         if [ -w /proc/sys/kernel/nmi_watchdog ]; then
  17.             echo 0 > /proc/sys/kernel/nmi_watchdog
  18.             log "VERBOSE" "NMI Watchdog timer disabled"
  19.         else
  20.             log "VERBOSE" "NMI Watchdog timer is not available"
  21.         fi
  22.  
  23.     fi
  24. else
  25.     log "VERBOSE" "NMI Watchdog timer power savings module is disabled"
  26. fi
  27.  
  28.